/*******************************************************************************
 * Copyright (c) 2018, 2018 GuoGuang Corporation and others.
 * All rights reserved. 
 *  
 * Create By Time 2018-2018年3月21日-上午9:13:09
 * Contributors:
 *     longshiyu
 * @longsy316@163.com
 *******************************************************************************/

package com.lsy.onehot.rnn.qa.data.extend;

import java.io.BufferedReader;
import java.io.IOException;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Map;
import java.util.Set;

import com.gg.lsy.ai.utils.words.StringUtils;
import com.lsy.lstm.ai.rnn.qa.dataset.io.CorpusHandle;
import com.lsy.onehot.rnn.qa.inner.IOnehot;

/**
 * @author Administrator
 * @time 2018 - 2018年3月21日 - 上午9:13:09
 * @desc CurpusIDictProcess.java
 */
public abstract class AbstractCurpusIDictProcess implements IDictProcess {

	public Set<Character> dictSpecialSet = new HashSet<>();
	public LinkedList<Character> dictSpeciallist = new LinkedList<Character>();
	public Map<Long, String> dict_Q = new HashMap<>();
	public Map<Long, String> dict_A = new HashMap<>();
	public long index = 0 ;
	
	public long getIndex(){
		return index ;
	}
	
	public void setIndex(long index){
		this.index = index ;
	}

	public LinkedList<Character> getListChar() {
		dictSpeciallist.addAll(dictSpecialSet);
		return dictSpeciallist;
	}

	public Map<Long, String> getDict_A() {
		return dict_A;
	}

	public Map<Long, String> getDict_Q() {
		return dict_Q;
	}

	public int getInputNums() {
		return dictSpeciallist.size();
	}

	/**
	 * 
	 */
	public AbstractCurpusIDictProcess() {
		// TODO Auto-generated constructor stub
	}

	public abstract void handleDict() throws IOException ;
	
	public abstract void handleSpecialDict() throws IOException ;

	public void process(String line, Map<Long, String> courpus,long count ){
		line = line.replaceFirst("m", "").replaceAll("\\s*","");
		courpus.put(count ,line);
	}
	
}
